/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "CONTROL", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "Control.findAll", query = "SELECT c FROM Control c"), @NamedQuery(name = "Control.findByIdCuenta", query = "SELECT c FROM Control c WHERE c.idCuenta = :idCuenta"), @NamedQuery(name = "Control.findByIdEntidad", query = "SELECT c FROM Control c WHERE c.idEntidad = :idEntidad"), @NamedQuery(name = "Control.findByIdInteres", query = "SELECT c FROM Control c WHERE c.idInteres = :idInteres"), @NamedQuery(name = "Control.findByIdPlazo", query = "SELECT c FROM Control c WHERE c.idPlazo = :idPlazo"), @NamedQuery(name = "Control.findByIdPrestamo", query = "SELECT c FROM Control c WHERE c.idPrestamo = :idPrestamo"), @NamedQuery(name = "Control.findByIdTarjeta", query = "SELECT c FROM Control c WHERE c.idTarjeta = :idTarjeta"), @NamedQuery(name = "Control.findByIdTipotarjeta", query = "SELECT c FROM Control c WHERE c.idTipotarjeta = :idTipotarjeta"), @NamedQuery(name = "Control.findByIdTransaccion", query = "SELECT c FROM Control c WHERE c.idTransaccion = :idTransaccion"), @NamedQuery(name = "Control.findByIdUsuario", query = "SELECT c FROM Control c WHERE c.idUsuario = :idUsuario"), @NamedQuery(name = "Control.findByLlave", query = "SELECT c FROM Control c WHERE c.llave = :llave"), @NamedQuery(name = "Control.findByNumeroCuenta", query = "SELECT c FROM Control c WHERE c.numeroCuenta = :numeroCuenta")})
public class Control implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "ID_CUENTA", nullable = false)
    private BigInteger idCuenta;
    @Basic(optional = false)
    @Column(name = "ID_ENTIDAD", nullable = false)
    private BigInteger idEntidad;
    @Basic(optional = false)
    @Column(name = "ID_INTERES", nullable = false)
    private BigInteger idInteres;
    @Basic(optional = false)
    @Column(name = "ID_PLAZO", nullable = false)
    private BigInteger idPlazo;
    @Basic(optional = false)
    @Column(name = "ID_PRESTAMO", nullable = false)
    private BigInteger idPrestamo;
    @Basic(optional = false)
    @Column(name = "ID_TARJETA", nullable = false)
    private BigInteger idTarjeta;
    @Basic(optional = false)
    @Column(name = "ID_TIPOTARJETA", nullable = false)
    private BigInteger idTipotarjeta;
    @Basic(optional = false)
    @Column(name = "ID_TRANSACCION", nullable = false)
    private BigInteger idTransaccion;
    @Basic(optional = false)
    @Column(name = "ID_USUARIO", nullable = false)
    private BigInteger idUsuario;
    @Id
    @Basic(optional = false)
    @Column(name = "LLAVE", nullable = false)
    private Character llave;
    @Basic(optional = false)
    @Column(name = "NUMERO_CUENTA", nullable = false)
    private BigInteger numeroCuenta;

    public Control() {
    }

    public Control(Character llave) {
        this.llave = llave;
    }

    public Control(Character llave, BigInteger idCuenta, BigInteger idEntidad, BigInteger idInteres, BigInteger idPlazo, BigInteger idPrestamo, BigInteger idTarjeta, BigInteger idTipotarjeta, BigInteger idTransaccion, BigInteger idUsuario, BigInteger numeroCuenta) {
        this.llave = llave;
        this.idCuenta = idCuenta;
        this.idEntidad = idEntidad;
        this.idInteres = idInteres;
        this.idPlazo = idPlazo;
        this.idPrestamo = idPrestamo;
        this.idTarjeta = idTarjeta;
        this.idTipotarjeta = idTipotarjeta;
        this.idTransaccion = idTransaccion;
        this.idUsuario = idUsuario;
        this.numeroCuenta = numeroCuenta;
    }

    public BigInteger getIdCuenta() {
        return idCuenta;
    }

    public void setIdCuenta(BigInteger idCuenta) {
        this.idCuenta = idCuenta;
    }

    public BigInteger getIdEntidad() {
        return idEntidad;
    }

    public void setIdEntidad(BigInteger idEntidad) {
        this.idEntidad = idEntidad;
    }

    public BigInteger getIdInteres() {
        return idInteres;
    }

    public void setIdInteres(BigInteger idInteres) {
        this.idInteres = idInteres;
    }

    public BigInteger getIdPlazo() {
        return idPlazo;
    }

    public void setIdPlazo(BigInteger idPlazo) {
        this.idPlazo = idPlazo;
    }

    public BigInteger getIdPrestamo() {
        return idPrestamo;
    }

    public void setIdPrestamo(BigInteger idPrestamo) {
        this.idPrestamo = idPrestamo;
    }

    public BigInteger getIdTarjeta() {
        return idTarjeta;
    }

    public void setIdTarjeta(BigInteger idTarjeta) {
        this.idTarjeta = idTarjeta;
    }

    public BigInteger getIdTipotarjeta() {
        return idTipotarjeta;
    }

    public void setIdTipotarjeta(BigInteger idTipotarjeta) {
        this.idTipotarjeta = idTipotarjeta;
    }

    public BigInteger getIdTransaccion() {
        return idTransaccion;
    }

    public void setIdTransaccion(BigInteger idTransaccion) {
        this.idTransaccion = idTransaccion;
    }

    public BigInteger getIdUsuario() {
        return idUsuario;
    }

    public void setIdUsuario(BigInteger idUsuario) {
        this.idUsuario = idUsuario;
    }

    public Character getLlave() {
        return llave;
    }

    public void setLlave(Character llave) {
        this.llave = llave;
    }

    public BigInteger getNumeroCuenta() {
        return numeroCuenta;
    }

    public void setNumeroCuenta(BigInteger numeroCuenta) {
        this.numeroCuenta = numeroCuenta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (llave != null ? llave.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Control)) {
            return false;
        }
        Control other = (Control) object;
        if ((this.llave == null && other.llave != null) || (this.llave != null && !this.llave.equals(other.llave))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.Control[llave=" + llave + "]";
    }

}
